<pre><?php 
require_once('simplesql.class.php5');
$db = new simplesql('mysql06.powweb.com','protonagenet','194911986','protonagenet');
try {
    $query = "CREATE TABLE `simplesql_cars` (
        `modelid` int(10) NOT NULL auto_increment,
        `modelname` varchar(255) NOT NULL default '',
        `active` tinyint(1) NOT NULL default '0',
        `location` varchar(255) NOT NULL default '',
        `content` varchar(255) NOT NULL default '',
        PRIMARY KEY  (`modelid`)
    ) TYPE=MyISAM AUTO_INCREMENT=0 ;";
    $db->query(trim($query));
    $db->insert(
        'modelname, active, location, content',
        "'Thunderbird 4100', 0, 'Williamsburg, VA', 'http://www.google.com/'", 'simplesql_cars'
    );
    $db->insert(
        'modelname, active, location, content',
        "'Dodge Viper', 1, 'Denver, CO', 'http://www.protonage.net'"
    );
    $db->insert(
        'modelname, active, location, content',
        "'Range Rover', 1, 'Reston, VA', 'http://www.google.com/'"
    );
    $db->insert(
        'modelname, active, location, content',
        "'Ford F150', 1, 'NewYork, NY', 'http://www.google.com/'"
    );
    $db->insert(
        'modelname, active, location, content',
        "'Toyota Corral', 0, 'Richmond, VA', 'http://www.google.com/'"
    );
    $db->insert(
        'modelname, active, location, content',
        "'BMW Z3', 1, 'Pitsburge, PA', 'http://www.dictionary.com/'"
    );    
} catch (Exception $e) {
    trigger_error($e->getmessage(), E_USER_ERROR);
    exit;
} 
print_r($db->fetch_search('VA', 'location', 'simplesql_cars', FETCH_OBJECT));
print_r($db->fetch_col('modelname, location, active = 1', null, FETCH_ASSOC));
print_r($db->get_lastquery());
print_r($db->fetch_row('modelid = 3'));
print_r($db->fetch_query('SELECT * FROM `simplesql_cars` WHERE modelid < 6 AND modelid > 2', FETCH_NUM));
print_r($db->get_result());
var_dump($db->get_rows());
print_r($db->fetch_col('modelname, content, location, content = "http://www.google.com/"', null, FETCH_ASSOC, 'modelid DESC', '1, 2'));
$db->insert('modelname, location, content', '"Mazda RX8", "Googleville, DC", "http://www.dotgeek.org"');
$fields = array('modelname', 'location', 'content');
$values = array("Mazda RX8", "Googleville, DC", "http://www.dotgeek.org");
$db->insert($fields, $values);
$db->update('active', '1', 'modelid = 5');
$db->delete("location = 'Richmond, VA'"); 
var_dump($db->field_exists('active'));
var_dump($db->field_exists('i_dont_exists'));
$db->showlog = true;
?></pre>